#include <stdio.h>

float tax(float income);

int main() {
    float income;

    printf("请输入您的须纳税数额：");
    scanf("%f", &income);

    printf("您需要缴纳的税额为：%f\n", tax(income));

    return 0;
}

float tax(float income) {
    if (income < 750) return income * 0.01f;
    else if (income < 2250) return 7.5f + (income - 750) * 0.02f;
    else if (income < 3750) return 37.5f + (income - 2250) * 0.03f;
    else if (income < 5250) return 82.5f + (income - 3750) * 0.04f;
    else if (income < 7000) return 142.5f + (income - 5250) * 0.05f;
    else return 230 + (income - 7000) * 0.06f;
}
